{% extends 'PHPDishWebBundle:Category:view_common.html.twig' %}

{% if app.request.query.get('orderby') == 'hot' %}
    {% set tab = 'hot' %}
{% else %}
    {% set tab = 'new' %}
{% endif %}

{% block category_content %}
    {% if posts.count %}
        {% include 'PHPDishWebBundle:Post:post_list.html.twig' %}
        {% if posts.haveToPaginate %}
        <footer class="panel-footer">
            {{ pagerfanta(posts, 'twitter_bootstrap3') }}
        </footer>
        {% endif %}
    {% else %}
        <div class="empty-data">
            <p><i class="if i-post-o"></i> 还没有文章</p>
        </div>
    {% endif %}
{% endblock %}